from drg_group.yinchuan_2023.Base import message,intersect,SS_VALID
from drg_group.yinchuan_2023.DRG import MDCD_DRG

def group(record):
  adrg_zd=["B08.501","B08.802","H65.000x002","H65.300","H65.300x001","H65.900x001","H66.000","H66.301","H66.400","H66.900","H66.900x002","H66.900x003","H70.000","H70.000x007","H70.001","H70.002","H70.101","H70.900","H71.x00","H71.x01","H72.900","H73.001","H74.000","H74.101","J00.x00","J00.x00x004","J01.000","J01.100","J01.200","J01.400","J01.800","J01.900","J01.901","J02.900","J02.900x002","J02.900x005","J02.901","J02.902","J02.903","J03.900","J03.900x001","J03.901","J06.900","J06.900x001","J10.100","J10.100x001","J10.101","J11.100x001","J30.300x001","J30.400","J31.000","J31.001","J31.005","J31.100","J31.200","J32.000","J32.000x005","J32.000x009","J32.004","J32.005","J32.200","J32.400","J32.400x001","J32.800x006","J32.800x008","J32.800x009","J32.801","J32.803","J32.900","J32.900x007","J32.906","J35.000","J39.000x001","J39.001","J39.002","J39.003","J39.216","J39.220"]
  adrg_zd1=[]
  adrg_ss=[]
  adrg_ss1=[]
  adrg_ss2=[]
  dept_list=[]
  if True and record.zdList[0] in adrg_zd:
    message('符合DT1入组条件，匹配规则：主诊断匹配')
    
    if MDCD_DRG.DT19_group(record):
      return 'DT19'

    return 'DT1'
  else:
    return ''

